from coin.exchange.base.kr_rest.derivative_util import PERPETUAL_DATE


def find_contract_type_from_expiry(current_datetime, expiry):
  assert expiry == PERPETUAL_DATE, expiry
  return 'perpetual'


def find_expiry_from_contract_type(current_datetime, contract_type):
  assert contract_type == 'perpetual', contract_type
  return PERPETUAL_DATE


def to_expiry_contract_type(expiry_str, current_datetime):
  assert expiry_str == 'perpetual', expiry_str
  expiry = PERPETUAL_DATE
  contract_type = 'perpetual'
  return expiry, contract_type


def parse_native_expiry_contract_type(expiry_str, current_datetime):
  assert expiry_str == 'PERP', expiry_str
  expiry = PERPETUAL_DATE
  contract_type = 'perpetual'
  return expiry, contract_type
